00问答网
所有问题
当前搜索:
霸气语句男生 文字
SQL查询
语句
(
男生
比女生多的班级)
答:
以1代表'男'和2代表'女', 来代替字段sex的值,我做的比较啰嗦 不过结果出来了,以下仅供参考:select aaa.classid from (select classid,count(*) as shu from student where sex='1' group by classid) as aaa,(select classid,count(*) as shu from student where sex='2' group by ...
统计汇总
男生
.女生的人数,请写出sql
语句
答:
select stuClass,count(stuName) 班级人数,sum(case when stuSex='男' then 1 else 0 end )
男生
人数,sum(case when stuSex='女' then 1 else 0 end ) 女生人数 from student group by stuClass
用sql
语句
查询哪些地区学生都为
男生
,显示地区籍贯
答:
select 籍贯 from (select 籍贯,性别 from table group by 籍贯,性别 having count(distinct 性别)=1 ) where 性别='男'
棣栭〉
<涓婁竴椤
18
19
20
21
22
23
24
25
26
31
其他人还搜